package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.ClientTypeMapper;
import com.gxa.saas.pojo.ClientType;
import com.gxa.saas.service.ClientTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("ClientTypeService")
public class ClientTypeServiceImpl implements ClientTypeService {
    @Autowired
    ClientTypeMapper clientTypeMapper;

    @Override
    public Integer inert(ClientType clientType) {
        return clientTypeMapper.insert(clientType);
    }

    @Override
    public void delete(Integer id) {
        clientTypeMapper.delete(id);
    }

    @Override
    public void update(ClientType clientType) {
        clientTypeMapper.update(clientType);
    }

    @Override
    public List<ClientType> selectAll() {
        return clientTypeMapper.selectAll();
    }

    @Override
    public List<ClientType> selectByPage(Integer page, Integer limit) {
        return this.clientTypeMapper.selectByPage((page-1) * limit,limit);
    }

}
